<template>
  <div class="layout-page">
    <div class="layout-page-header" v-if="$slots.header">
      <slot name="header"></slot>
    </div>
    <div class="layout-page-content">
      <slot></slot>
    </div>
    <div class="layout-page-footer" v-if="$slots.footer">
      <slot name="footer"></slot>
    </div>
  </div>
</template>

<script setup>

</script>

<style lang="scss">
.layout-page {
  height: calc(100% - 40px);
  display: flex;
  flex-direction: column;
  margin: 20px;

  &-header {
    flex: 1;
    margin-bottom: 20px;
    background-color: #ffffff;
    padding: 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  &-content {
    overflow: hidden;
    background-color: #ffffff;
    flex: 9;
  }

  &-footer {
    flex: 1;
    margin-top: 20px;
    background-color: #ffffff;
  }
}
</style>
